for a in range(100,1000):
  gw=a%10
  sw=a//10%10
  bw=a//100
  if gw**3+sw**3+bw**3==a:
    print(a)